package com.starsoft.smdc.bean;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * SmdcDiv entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "smdc_div")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE, region="ormCache")
public class SmdcDiv implements java.io.Serializable {

	// Fields

	private SmdcDivId id;
	private Date publishDate;
	private Date earningDate;
	private Date earningDivDate;
	private Double perShareDiv;
	private Double perShareTrans;
	private Double perCashDiv;
	private Double perCashDivAfTax;
	private Double additionalIssue;
	private Double sharesBfDiv;
	private Double sharesAfDiv;
	private Double adjFactor;
	private Double shareFactor;
	private Double adjFactorBf;
	private Double shareFactorBf;

	// Constructors

	/** default constructor */
	public SmdcDiv() {
	}

	/** minimal constructor */
	public SmdcDiv(SmdcDivId id) {
		this.id = id;
	}

	/** full constructor */
	public SmdcDiv(SmdcDivId id, Date publishDate, Date earningDate, Date earningDivDate, Double perShareDiv,
			Double perShareTrans, Double perCashDiv, Double perCashDivAfTax, Double additionalIssue,
			Double sharesBfDiv, Double sharesAfDiv, Double adjFactor, Double shareFactor, Double adjFactorBf,
			Double shareFactorBf) {
		this.id = id;
		this.publishDate = publishDate;
		this.earningDate = earningDate;
		this.earningDivDate = earningDivDate;
		this.perShareDiv = perShareDiv;
		this.perShareTrans = perShareTrans;
		this.perCashDiv = perCashDiv;
		this.perCashDivAfTax = perCashDivAfTax;
		this.additionalIssue = additionalIssue;
		this.sharesBfDiv = sharesBfDiv;
		this.sharesAfDiv = sharesAfDiv;
		this.adjFactor = adjFactor;
		this.shareFactor = shareFactor;
		this.adjFactorBf = adjFactorBf;
		this.shareFactorBf = shareFactorBf;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "secId", column = @Column(name = "secId", nullable = false, length = 10)),
			@AttributeOverride(name = "divDate", column = @Column(name = "div_date", nullable = false, length = 10)) })
	public SmdcDivId getId() {
		return this.id;
	}

	public void setId(SmdcDivId id) {
		this.id = id;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "publishDate", length = 10)
	public Date getPublishDate() {
		return this.publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "earningDate", length = 10)
	public Date getEarningDate() {
		return this.earningDate;
	}

	public void setEarningDate(Date earningDate) {
		this.earningDate = earningDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "earningDivDate", length = 10)
	public Date getEarningDivDate() {
		return this.earningDivDate;
	}

	public void setEarningDivDate(Date earningDivDate) {
		this.earningDivDate = earningDivDate;
	}

	@Column(name = "perShareDiv", precision = 10, scale = 4)
	public Double getPerShareDiv() {
		return this.perShareDiv;
	}

	public void setPerShareDiv(Double perShareDiv) {
		this.perShareDiv = perShareDiv;
	}

	@Column(name = "perShareTrans", precision = 10, scale = 4)
	public Double getPerShareTrans() {
		return this.perShareTrans;
	}

	public void setPerShareTrans(Double perShareTrans) {
		this.perShareTrans = perShareTrans;
	}

	@Column(name = "perCashDiv", precision = 10, scale = 4)
	public Double getPerCashDiv() {
		return this.perCashDiv;
	}

	public void setPerCashDiv(Double perCashDiv) {
		this.perCashDiv = perCashDiv;
	}

	@Column(name = "perCashDivAfTax", precision = 10, scale = 4)
	public Double getPerCashDivAfTax() {
		return this.perCashDivAfTax;
	}

	public void setPerCashDivAfTax(Double perCashDivAfTax) {
		this.perCashDivAfTax = perCashDivAfTax;
	}

	@Column(name = "additionalIssue", precision = 22, scale = 0)
	public Double getAdditionalIssue() {
		return this.additionalIssue;
	}

	public void setAdditionalIssue(Double additionalIssue) {
		this.additionalIssue = additionalIssue;
	}

	@Column(name = "sharesBfDiv", precision = 22, scale = 0)
	public Double getSharesBfDiv() {
		return this.sharesBfDiv;
	}

	public void setSharesBfDiv(Double sharesBfDiv) {
		this.sharesBfDiv = sharesBfDiv;
	}

	@Column(name = "sharesAfDiv", precision = 22, scale = 0)
	public Double getSharesAfDiv() {
		return this.sharesAfDiv;
	}

	public void setSharesAfDiv(Double sharesAfDiv) {
		this.sharesAfDiv = sharesAfDiv;
	}

	@Column(name = "adjFactor", precision = 22, scale = 0)
	public Double getAdjFactor() {
		return this.adjFactor;
	}

	public void setAdjFactor(Double adjFactor) {
		this.adjFactor = adjFactor;
	}

	@Column(name = "shareFactor", precision = 22, scale = 0)
	public Double getShareFactor() {
		return this.shareFactor;
	}

	public void setShareFactor(Double shareFactor) {
		this.shareFactor = shareFactor;
	}

	@Column(name = "adjFactorBf", precision = 22, scale = 0)
	public Double getAdjFactorBf() {
		return this.adjFactorBf;
	}

	public void setAdjFactorBf(Double adjFactorBf) {
		this.adjFactorBf = adjFactorBf;
	}

	@Column(name = "shareFactorBf", precision = 22, scale = 0)
	public Double getShareFactorBf() {
		return this.shareFactorBf;
	}

	public void setShareFactorBf(Double shareFactorBf) {
		this.shareFactorBf = shareFactorBf;
	}

}